const webpack = require('webpack');
const webpackHotMiddleware = require('webpack-hot-middleware');
const webpackDevMiddleware = require('webpack-dev-middleware');

const express = require('express');
const app = express();

const config = require('./webpack.config.js');
var compiler = webpack(config);
app.use(webpackDevMiddleware(compiler, {
    // publicPath:config.output.publicPath,
    noInfo:true,
    stats:{
        colors:true
    }
}));
app.use(webpackHotMiddleware(compiler));

app.listen("8080", () => {
  console.log('listen at 8080');
})
